package com.occludens.shared.dispatch;

import com.gwtplatform.dispatch.shared.Result;

public class GetUserResult implements Result { 

	  java.lang.String errorText;
	  com.occludens.shared.model.UserInfo userInfo;

	  public GetUserResult(java.lang.String errorText, com.occludens.shared.model.UserInfo userInfo) {
	    this.errorText = errorText;
	    this.userInfo = userInfo;
	  }

	  protected GetUserResult() {
	    // Possibly for serialization.
	  }

	  public java.lang.String getErrorText() {
	    return errorText;
	  }

	  public com.occludens.shared.model.UserInfo getUserInfo() {
	    return userInfo;
	  }

	  @Override
	  public boolean equals(Object obj) {
	    if (this == obj)
	        return true;
	    if (obj == null)
	        return false;
	    if (getClass() != obj.getClass())
	        return false;
	    GetUserResult other = (GetUserResult) obj;
	    if (errorText == null) {
	      if (other.errorText != null)
	        return false;
	    } else if (!errorText.equals(other.errorText))
	      return false;
	    if (userInfo == null) {
	      if (other.userInfo != null)
	        return false;
	    } else if (!userInfo.equals(other.userInfo))
	      return false;
	    return true;
	  }

	  @Override
	  public int hashCode() {
	    int hashCode = 23;
	    hashCode = (hashCode * 37) + (errorText == null ? 1 : errorText.hashCode());
	    hashCode = (hashCode * 37) + (userInfo == null ? 1 : userInfo.hashCode());
	    return hashCode;
	  }

	  @Override
	  public String toString() {
	    return "GetUserResult["
	                 + errorText
	                 + ","
	                 + userInfo
	    + "]";
	  }

}
